#include "listener.h"

//Libraries
#include "processthread.h"

Listener::Listener(QObject *parent) : QTcpServer(parent)
{
    loggedUsers = new LoggedUsers();
}

void Listener::incomingConnection(int socketDescriptor)
{
    ProcessThread *thread = new ProcessThread(socketDescriptor, loggedUsers, this);
    connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
    thread->start();
}
